﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using TulingBuy.CRM.BLL;
using TulingBuy.CRM.Operation;
using TulingBuy.CRM.Operation.Data;

namespace TulingBuy.CRM.Web.Service.Data
{
    /// <summary>
    /// Summary description for GetPublishData
    /// </summary>
    public class GetPublishData : BaseHttpHandler
    {

        public override void ProcessRequest(HttpContext context)
        {
            context.Response.ContentType = "text/plain";
            Publish publish = new Publish();
            string type = context.Request["type"];
            string entitylist = context.Request["entitylist"];
            string returnValue = "";
            if (!string.IsNullOrWhiteSpace(type)) {
                switch (type) {
                    case "1":
                        break;
                    case "2":
                        context.Response.Write("{\"data\":\"Hello World\"}");
                        returnValue = publish.RetrievePublish(entitylist);
                        break;
                }
            }
            
        }

        //public bool IsReusable
        //{
        //    get
        //    {
        //        return false;
        //    }
        //}
    }
}